package com.team.controller;

import com.team.entity.DataDictionary;
import com.team.service.DataDictionaryService;
import com.team.utils.SysDictionary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


import java.util.List;

@Controller
@RestController
public class DataDictionaryController {
    @Autowired
    private DataDictionaryService dataDictionaryService;
    //获取所有状态
    @ResponseBody
    @RequestMapping(value = "/getDictionaryData")
    public List<DataDictionary> getDataDictionary(){
        List<DataDictionary> list = dataDictionaryService.getDictionary(SysDictionary.APPState);
        return list;
    }

    //获取所有平台
    @ResponseBody
    @RequestMapping(value = "/getDictionaryPTData")
    public List<DataDictionary> getDictionaryPTData(){
        List<DataDictionary> appInfoList = dataDictionaryService.getDictionary(SysDictionary.APPPT);
        return appInfoList;
    }

}
